1. Field of the Invention
An embodiment of the present invention relates to a method, medium, and apparatus encoding and/or decoding an image.
2. Description of the Related Art
Generally, when an image is captured, the image is captured in a RGB format. However, when the captured image is compressed, the image is typically transformed to an image of a YUV or YCbCr format. In this case, Y is a luminance component, such as a black and white image, and U (or Cb) and V (or Cr) are chrominance components of the corresponding image. Information is typically evenly distributed to R, G, and B in an RGB image, whereas in a YUV (or YCbCr) image, a majority of the information flows into the Y component while a small amount of information is distributed to U (or Cb) and V (or Cr) components. Thus, when compression of an image is performed, compression efficiency of a YUV (or YCbCr) image is greater than that of an RGB image as two of the components include less information. In order to further increase the compression efficiency, a YUV (or YCbCr) 4:2:0 image is used, where the U (or Cb) and V (or Cr) components are sampled ¼ as many times as the luminance component Y
In this YUV (or YCbCr) 4:2:0 image, since a statistical characteristic of the Y component is different from a statistical characteristic of the U (or Cb) or V (or Cr) component, when conventional image compression is performed, the Y component and the U (or Cb) and V (or Cr) components are processed using different encoding techniques. For example, according to recently standardized MPEG-4 AVC/H.264 standard technology of a Joint Video Team of ISO/IEC MPEG and ITU-T VCEG (“Text of ISO/IEC FDIS 14496-10: Information Technology—Coding of Audio-Visual Objects—Part 10: Advanced Video Coding”, ISO/IEC JTC 1/SC 29/WG 11, N5555, March, 2003) (hereinafter, called as MPEG4 AVC/H.264), when a Y component of a video signal is encoded to an intra-image, i.e., based on information within the image, spatial prediction is performed using 9 prediction techniques according to directions predicted based on 4×4 blocks. In addition, spatial prediction is performed using 4 prediction techniques according to directions predicted based on 16×16 blocks. However, for the U (or Cb) and V (or Cr) components of the video signal, since their images are relatively simple compared to the Y component, spatial prediction independent to the Y component is performed using 4 prediction techniques based on their respective directions predicted based on 8×8 blocks.
When encoding to an intra-image is performed, i.e., based on information from other images, motion compensation of the Y component is finely performed by expanding predicted images using a 6-tap filter, whereas motion compensation of the U (or Cb) and V (or Cr) components is performed by expending predicted images using a bi-linear filter. In this way, according to such conventional systems, an image is compressed using different techniques between the luminance and chrominance components since the statistical characteristic of the Y component is different from the statistical characteristic of the U (or Cb) or V (or Cr) component.
In addition, even when a residue image, e.g., obtained through temporal-spatial prediction, is entropy encoded using a binary arithmetic coder, the residue image is compressed using a method in which different probability models are used for the respective components. However, the sampling of U (or Cb) and V (or Cr) of a YUV (or YCbCr) 4:2:0 image by % of the sampling of the Y component is not suitable for high image quality applications due to generated color distortions. Thus, a method of effectively encoding a YUV (or YCbCr) 4:4:4 image, where such a U (or Cb) and V (or Cr) sampling process is unnecessary, has been found to be desirable. Accordingly, by directly encoding an RGB image, color distortions occurring in such a YUV (or YCbCr) transforming process can be avoided.
However, if an image, such as a YUV (or YCbCr) 4:4:4 image or an RGB image, in which image components have the same resolution, are directly encoded, if MPEG-4 AVC/H.264, as a conventional YUV (or YCbCr) 4:2:0 image compression method, is applied to the image encoding efficiency decreases. This is caused by the application of a method suitable for U (or Cb) and V (or Cr) components of a YUV (or YCbCr) 4:2:0 image to a YUV (or YCbCr) 4:4:4 image or an RGB image without any change. Accordingly, embodiments of the present invention overcome these drawbacks.